package com.orafl.use.comorafluse.Func;

import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;

public class FunctionTest {
    public static void main(String[] args) {

        String value ="zhangsan";
        //Function<Long,String>  第一个参数入参  第二个参数返回参数
        Map<String,Function<Long,String>> functionMap = new HashMap<>();



        functionMap.put("zhangsan",(v)->{
            return "我是返回参数" +v;
        });
        functionMap.put("张三",(v)->{
            return "我是返回参数" +v;
        });

        System.out.println(   functionMap.get(value).apply(1234L));





        if("张三".equals(value)){
            System.out.println(value);
        }else if("zhangsan".equals(value)){
            System.out.println(value + "zhangsan");
        }
    }
}
